def build_tree(data, parent_id=None):
    tree = []
    for item in data:
        if item['folder_parent_id'] == parent_id:
            children = build_tree(data, item['id'])
            if children:
                item['children'] = children
            tree.append(item)
    return tree

# 示例数据
data = [
    {'id': 44,'folder_name':'文件夹第一层', 'folder_parent_id': None, 'folder_list': []},
    {'id': 45,'folder_name':'文件夹第二层', 'folder_parent_id': 44, 'folder_list': []},
    {'id': 46,'folder_name':'文件夹第三层', 'folder_parent_id': 45, 'folder_list': []},
    {'id': 47,'folder_name':'文件夹第三1层', 'folder_parent_id': 45, 'folder_list': []},
    {'id': 48,'folder_name':'文件夹第三2层', 'folder_parent_id': 45, 'folder_list': []},
    {'id': 49,'folder_name':'文件夹第三3层', 'folder_parent_id': 45, 'folder_list': []},
]

# 从根节点开始查找
result = build_tree(data)
print(result)
